#!/bin/bash
#
# chkconfig: 345 96 96
# description: simple mq server
#
# processname: mqserver

# source function library
. /etc/rc.d/init.d/functions

. /etc/profile.d/axis2c.sh
. /etc/profile.d/staff.sh

RETVAL=0

prog="mqserver"

case "$1" in
  start)
    echo -n $"Starting $prog: "
    ${STAFF_HOME}/bin/mqserver >/var/log/mqserver.log 2>&1 &
    echo
  ;;

  stop)
    echo -n $"Shutting down $prog: "
    killall ${STAFF_HOME}/bin/mqserver 2>/dev/null
    RETVAL=$?
    echo
  ;;

  restart|reload)
    $0 stop
    $0 start
    RETVAL=$?
  ;;


  status)
    status mqserver
    RETVAL=$?
  ;;

  *)
    echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
    exit 1
esac

exit $RETVAL
